﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text;
//using HttpServer;
//using HttpServer.Headers;
//using HttpListener = HttpServer.HttpListener;

namespace CSharpExt.Net.Http
{
    /*public class HttpServer : HttpListener
    {
        #region Constructor

        protected HttpServer(IPAddress address, int port)
            : base(address, port)
        {
        }

        #endregion

        #region Static Constructors

        public static HttpServer Create(int port)
        {
            return HttpServer.Create(IPAddress.Any, port);
        }

        public new static HttpServer Create(IPAddress address, int port)
        {
            HttpServer server = new HttpServer(address, port);
            server.RequestReceived += server.OnRequestReceived;
            return server;
        }

        #endregion

        #region Operations

        public void Start()
        {
            base.Start(16);
        }

        #endregion

        #region Callbacks

        private void OnRequestReceived(Object sender, RequestEventArgs e)
        {
            e.Response.Connection.Type = ConnectionType.Close;
            byte[] buffer = Encoding.UTF8.GetBytes("<html><body>Hello wordl!</body></html>");
            e.Response.Body.Write(buffer, 0, buffer.Length);
        }

        #endregion
    }*/
}
